-
Notifications
You must be signed in to change notification settings - Fork 0
SEC-1601: jvm metrics #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis PR integrates Prometheus JMX exporter into the ActiveMQ Docker image. It adds JMX agent JAR download with checksum verification, creates a jmx.yml configuration file defining metric collection rules, and configures the environment to expose metrics on port 3001 while excluding JMX from health checks. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Dockerfile (1)
10-10: Port 3001 (JMX metrics) is not exposed.The JMX exporter is configured to run on port 3001 (line 46) but the EXPOSE statement does not include it. Metrics will be unreachable from outside the container.
Add port 3001 to the EXPOSE statement:
-EXPOSE 8161 61613 61616 +EXPOSE 8161 61613 61616 3001
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
Dockerfile(1 hunks)healthcheck.sh(1 hunks)jmx.yml(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.11.0)
healthcheck.sh
[warning] 4-4: In POSIX sh, string replacement is undefined.
(SC3060)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build / build-push
🔇 Additional comments (2)
jmx.yml (1)
1-36: Verify jmx_exporter configuration against actual ActiveMQ MBean names.The configuration looks structurally sound for Prometheus JMX exporter, but the regex patterns should be validated against actual ActiveMQ broker MBean attribute names to ensure they correctly match and extract metrics.
To verify the patterns work correctly, confirm:
- ActiveMQ broker exposes MBeans matching
org.apache.activemq:type=Broker,brokerName=*- Queue/topic destination names match the pattern separators (spaces after commas in line 12, 18)
- The
valueFactor: 0.01correctly converts percent usage to 0–1 rangeIf you have access to a running ActiveMQ instance, you can verify the MBean names by inspecting JMX metrics. Alternatively, consult the jmx_prometheus_exporter documentation to confirm the pattern syntax (particularly the angle bracket format
<type=Broker, ...><>on lines 12, 18, etc.).Dockerfile (1)
35-43: Based on my verification:Update Dockerfile to use the latest JMX exporter version 1.5.0 and verify the digest.
Version 1.4.0 was released Aug 25, 2025, but version 1.5.0 (published Oct 7, 2025) is the latest release. While 1.4.0 is technically valid, using an outdated version introduces maintenance risk. GitHub Release page hosts the JARs (collector jar no longer published to Maven Central).
Manually verify the SHA256 digest
db1492e95a7ee95cd5e0a969875c0d4f0ef6413148d750351a41cc71d775f59amatches the official GitHub release artifact for version 1.4.0 before proceeding.
Summary by CodeRabbit
Release Notes